﻿using EF测试;
using EFCore.BulkExtensions; // 引入批量插入的扩展

// 批量插入
using (ARgoContext context = new ARgoContext())
{
    var products = new List<Product>
    {
        new Product { Name = "iPhone X", Price = 9999 },
        new Product { Name = "Samsung Galaxy S10", Price = 7999 },
        new Product { Name = "Google Pixel 4", Price = 5999 }
    };

    context.BulkInsert(products); // 使用批量插入
}

// 批量查询
using (ARgoContext context = new ARgoContext())
{
    var products = context.Products.ToList();
    foreach (var product in products)
    {
        Console.WriteLine($"产品名称: {product.Name}, 价格: {product.Price}");
    }
}
